<extend name="Usercenter/index"/>

<block name="main">
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
        <ul class="layui-tab-title">
            <li class="layui-this">个人头像修改</li>
        </ul>
        <div class="layui-tab-content">

            <div class="layui-tab-item layui-show">

                <div class="view-product">
                    <div class="layui-container" style="margin-top: 20px">
                        <div class="layui-row">

                            <div class="layui-col-md5 layui-col-md-offset1">
                                <form class="layui-form" action="{{:U('Usercenter/updateImg')}}" method="post" enctype="multipart/form-data">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">头像</label>
                                        <div class="layui-input-block">
                                            <input type="file" name="photo">
                                        </div>
                                    </div>


                                    <div class="layui-form-item">
                                        <div class="layui-input-block">
                                            <!--<button class="layui-btn" lay-submit >立即提交</button>-->
                                            <button type="submit" class="layui-btn" lay-submit>
                                                <i class="layui-icon">&#xe67c;</i>上传图片
                                            </button>
                                        </div>
                                    </div>
                                </form>

                            </div>
                        </div>
                    </div>
                    <script>
                        //Demo
                        layui.use('form', function(){
                            var form = layui.form;

                            //监听提交
                            form.on('submit(formDemo)', function(data){
                                layer.msg(JSON.stringify(data.field));
                                return false;
                            });
                        });
                    </script>

                    <div class="show-page padding-big-right hidden">
                        <div class="page">
                        </div>
                    </div>
                </div>

            </div>


        </div>
        <script>
            //注意：选项卡 依赖 element 模块，否则无法进行功能性操作
            layui.use('element', function(){
                var element = layui.element;
            });
        </script>
    </div>
</block>